#include <stdio.h>
#include <stdlib.h>
#include <math.h>

#include "chainedlist.h"

#define MAX 30000

char test( void* data, void* value )
{
  if( (int)data == *((int*)value))
    return 1;

  return 0;
}

int main(int argc, char** argv)
{

  CLNode_s* cl = CL_create();

  int i;
  for(i=0;i<MAX;i++)
  {
    CL_push_back(cl, (void*)(random() % 1000) );
  }
  
  int loutre = 42;

  fprintf(stderr,"%p\n",(CL_search_user(cl,test,&loutre))->data);

  CL_destroy(cl);

  return 0;
}
